﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MM.Commmon.UI
{
    public partial class FrmProcessing : Form
    {
        public FrmProcessing()
        {
            InitializeComponent();
            base.ShowInTaskbar = false;
            base.TransparencyKey = this.BackColor;
        }

        public void Guage(string strDispose, int point)
        {
            try
            {
                this.progressBar1.Value = point;
                this.Text = strDispose;
                this.Refresh();
                Application.DoEvents();
            }
            catch
            {
            }
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            e.Graphics.DrawString(this.Text, new Font("宋体", 10f), new SolidBrush(Color.Black), e.ClipRectangle, new StringFormat(StringFormatFlags.NoWrap) { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center });
        }
    }
}
